﻿using System;
using System.Collections.Generic;
using LayeredArchitectureSample.DomainModel;

namespace LayeredArchitectureSample.ViewModel
{
    // TODO: autogenerate
    internal class TripViewModel
    {
        private readonly IEnumerable<WareInTripViewModel> _wares;
        private readonly RouteViewModel _route;
        private readonly string _status;
        private readonly TripState _tripState;

        public TripViewModel(IEnumerable<WareInTripViewModel> wares, long id, RouteViewModel route, string status,
            TripState tripState)
        {
            if (wares == null) throw new ArgumentNullException("wares");
            if (route == null) throw new ArgumentNullException("route");
            if (status == null) throw new ArgumentNullException("status");

            Id = id;
            _wares = wares;
            _status = status;
            _tripState = tripState;
            _route = route;
        }

        public TripState State
        {
            get { return _tripState; }
        }

        public IEnumerable<WareInTripViewModel> Wares
        {
            get { return _wares; }
        }

        public string Status
        {
            get { return _status; }
        }

        public RouteViewModel Route
        {
            get { return _route; }
        }

        public long Id { get; private set; }
    }
}